package com.redhat.auth.application.impl;

import org.springframework.stereotype.Service;

import com.dayatang.querychannel.service.QueryChannelService;
import com.redhat.auth.application.SecurityStrategyApplication;
import com.redhat.auth.domain.SecurityStrategy;

/**
 * 安全策略
 * 
 * @author Justin
 * 
 */
@Service("securityStrategyApplication")
public class SecurityStrategyApplicationImpl implements
		SecurityStrategyApplication {

	private QueryChannelService queryChannel;

	public void setQueryChannel(QueryChannelService queryChannel) {
		this.queryChannel = queryChannel;
	}

	public SecurityStrategy loadSecurityStrategy() {
		return SecurityStrategy.load();
	}

	/**
	 * 保存安全策略设置
	 */
	public void saveSecurityStrategy(SecurityStrategy strategy) {
		strategy.save(strategy);
	}

}
